package rlex.classes;

import java.io.File;
import java.io.IOException;

import rlex.classes.program.Program;

public class Main {

    /**
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {
        File file = new File("file3.txt");
        Parser parser = new Parser();
        parser.readFile(file);
        parser.parser();
//       parser.listToken();
//        parser.listErrors();
        
        Syntactic syn = new Syntactic(parser.getTokens());
        Program program = syn.run();

        if (program != null) {
        	Semantic semantic = new Semantic(program);
        	try {
				semantic.run();
			} catch (Exception e) {
				e.printStackTrace();
			}
        }
//        List<Token> tokens = parser.getTokens();
//        checkProgram(tokens);
    }
}

